Automatic focusing device

ABSTRACT

In automatic focusing devices of the type which detect a defocus degree and a focusing direction and according to the results of detection, automatically shift a lens to an in-focus position, an accurate defocus degree cannot be obtained when the lens position is far away from an in-focus point. In such a case, focus detection must be carried out by driving the lens in the focusing direction solely according to information on the focusing direction, which, because of a weak signal from the detection output, necessitates a slow lens driving speed and accordingly takes a long time for shifting the lens position to an in-focus point. Another problem with conventional devices is the possibility of hunting, which tends to occur before the in-focus position is attained. An automatic focusing device according to the invention solves these problems by driving the lens in the focusing direction, detected when the lens is in a position away from an in-focus point and by inhibiting the detecting action while the lens is driven. Furthermore, when overshoot once happens, the detected defocus degree is decreased and the decreased defocus degree is transmitted to a lens drive circuit driving the lens to a decreased degree in the next lens driving process to preclude the possibility of hunting.

This is a divisional application of Ser. No. 448,742, filed Dec. 10,1982, now abandoned.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a lens drive arrangement for an automaticfocusing device.

2. Description of the Prior Art

In situations where an automatic focusing device is required to performa continuous focusing operation, a servo-like control using a motor orthe like is employed as a typical lens driving method. In conventionalautomatic focusing devices, however, there is the probability oferroneous detection during a lens position adjusting process and such aprobability increases particularly where the lens position is shifted ata high speed or where sensors of low sensitivity are used. As a result,conventional devices of this type have been compelled to drive the lensat a very low speed. Accordingly, photographers have often missed goodshutter chances. Furthermore, in the servo-like control, the motor iscontrolled by a servo system. Generally, however, there arises anovershoot problem during control by a servo system. When the lens isdriven to an in-focus point, the lens does not stop there but is apt tomove to a point beyond the in-focus point. Therefore, in shifting thelens to an in-focus position under servo-like control, hunting of thelens might occur. In such a situation, the lens slowly reaches thein-focus point after moving back and forth across the in-focus point.Under the servo-like control, the lens can be brought into an in-focusposition once a lens driving direction toward the in-focus point isdetected. However, where more speedy and more accurate automaticfocusing is desired, it is preferable to promptly shift the lensposition to an in-focus point by virtue of defocus degree information.

SUMMARY OF THE INVENTION

It is an object of the invention to provide an automatic focusing devicein which a lens is either driven on the basis of defocus informationwhen the information on a defocus degree from an in-focus point ishighly accurate, i.e., when the lens position is relatively close to thein-focus point, or driven to a predetermined extent when the aboveinformation is not sufficiently accurate, i.e., when the lens positionis far away from the in-focus point. This arrangement permits the lensto be promptly positioned close to the in-focus point even when the lensposition is far away from the in-focus point. After that, the lensposition can be shifted to the in-focus point according to a defocusdegree. Therefore, a focusing action can be accomplished within a shortperiod of time.

It is another object of the invention to provide an automatic focusingdevice wherein information on a defocus degree and information on afocusing direction, which are detected through a focus detecting action,are utilized for increasing the shifting speed of a lens position to anin-focus point in such a manner that the lens is driven according to thedefocus degree information when the defocus degree information isaccurate, or is driven to a predetermined extent in the direction shownby the focusing direction information when the accuracy of the defocusdegree information is low while that of the focusing directioninformation alone is high with the lens position being far away from anin-focus point, or is driven to a predetermined extent in apredetermined direction when both the defocus degree information and thefocusing direction information are of low accuracy with the lensposition being far from an in-focus point.

It is a further object of the invention to provide an automatic focusingdevice wherein hunting mentioned in the foregoing is prevented byreducing a detected defocus degree and by driving a lens only to thereduced defocus degree when the focusing direction information obtainedthrough a focus detecting process shows a direction different from thedirection shown by previous information obtained through a precedingfocus detecting process, i.e., when overshoot once takes place.

It is still a further object of the invention to provide an automaticfocusing device wherein, in carrying out the above lens shifting controlaccording to a detected defocus degree, the lens is driven to an extentcorresponding to the detected defocus degree through an extremely simplecomputing process.

These and further objects and features of the invention will becomeapparent from the following detailed description of preferredembodiments thereof taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration of the focus detecting method of anautomatic focusing device according to the present invention.

FIG. 2 is a block diagram schematically showing the arrangement ofconstituent units of different functions of the automatic focusingdevice embodying the present invention.

FIG. 3 is a circuit diagram showing, by way of example, a focusdetection unit shown in FIG. 2.

FIG. 4 is a waveform chart showing the focus detecting action of thefocus detection unit shown in FIG. 3.

FIG. 5 is a circuit diagram showing, by way of example, a driveinstruction unit shown in FIG. 2.

FIG. 6 is a circuit diagram showing, by way of example, a dividingcircuit shown in FIG. 5.

FIG. 7 is an illustration of the operation of the circuit shown in FIG.5.

FIG. 8 is a circuit diagram showing, by way of example, a drive controlunit shown in FIG. 2.

FIG. 9 is a schematic illustration showing by, way of example, a driveunit shown in FIG. 2.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring to FIG. 1 which shows the focus detecting method of anautomatic focusing device according to the invention, a photo-takinglens 1 is movable along an optical axis 0 thereof, back and forth asindicated by an arrow, to correctly form the image of an object on apredetermined imaging plane 2. To detect the focused image, imagesobtained at a lens position equivalent to the predetermined imagingplane 2 and at other positions located before and after the equivalentposition, such as the points indicated by reference numerals 4, 5 and 6in FIG. 1, are converted into electrical signals through sensors and arethen compared. The defocus degree of the image relative to thepredetermined imaging plane 2 is computed through this comparisonprocess. The lens 1 is then moved according to the result of computationand is stopped at a proper position.

Referring to FIG. 2, with the images which are obtained at the positions4, 5 and 6 converted into electrical signals at a sensor unit 11, theelectrical signals are supplied to a focus detection unit 12. The focusdetection unit 12 detects the defocus degree and determines whether theimages thus obtained are in focus or out of focus. A drive indication orinstruction unit 13 computes a driving extent required for accuratelyand quickly obtaining an in-focus state. Then, a drive control unit 14controls a drive unit 15 according to the driving extent thus obtained.

The focus detection unit 12 is arranged as shown in FIG. 3. In FIG. 3,reference numerals 21, 22 and 23 indicate sensors which are in positionsto see regions equivalent to the above positions 4, 5 and 6. Anothersensor 24 sees an approximately equivalent region for the purpose ofstabilizing signals by brightness. For this purpose, a constant currentis supplied from a constant current circuit 25 to the sensor 24 in sucha manner that a line 26 has a potential level which becomes lower as thebrightness of the distance measuring region increases, that is, there isproduced a signal, the level of which becomes lower as the brightnessincreases. This brightness signal is differentially amplified at adifferential amplifier 29 relative to a reference potential determinedby resistors 27 and 28 to produce in a line 30 a signal, the level ofwhich becomes higher as the brightness increases. This signal is used tocontrol constant current circuits 31, 32 and 33 to cause currentsflowing in these circuits to increase with the brightness in such amanner that the signal level produced at each of points 34, 35 and 36corresponds solely to image sharpness irrespective of the brightness ofambient light.

In other words, a driving current which varies with the brightness ofambient light is allowed to flow to each of the sensors 21, 22 and 23.The output level of each of the sensors 21 to 23 is thus determinedsolely by image sharpness irrespective of the brightness of the ambientlight.

Signals representing the image sharpness obtained at a prescribed focalplane and at positions located in front and in the rear thereof areamplified by amplifiers 37, 38 and 39. Through this process, lines 40,41 and 42 give respective sharpness signals for the position before theprescribed focal plane (or the position 4 shown in FIG. 1), theprescribed focal plane (the position 5 shown in FIG. 1) and the positionafter the prescribed focal plane (the position 6 shown in FIG. 1). Thesignal levels of the lines 40, 41 and 42 are controlled by the aboveamplifiers 37, 38 and 39 to increase with the sharpness. Of the threesignals, the two signals of the lines 40 and 42 are supplied to adifferential amplifier 43 to obtain a difference between the degrees ofsharpness of images formed at the positions before and after theprescribed imaging plane 2 (the positions 4 and 6 shown in FIG. 1). Atthe same time, the sum of the degrees of sharpness of the images beforeand after the prescribed imaging plane 2 is obtained at an additionamplifier 44. The two values thus obtained are supplied to a divider 45to rate the image sharpness of an object to be photographed by dividingthe difference with the sum. Then, a signal proportional to the imagesobtained at the positions before and after the prescribed imaging plane2, i.e., a signal representative of a degree of defocus is produced at aterminal 46.

More specifically, assuming that the output of the line 41 is varying asrepresented by A1 in FIG. 4(a), the output (a sharpness signal) of theline 40 as represented by A2 and that of the line 42 as represented byA3 in FIG. 4(a), a difference between the outputs of lines 40 and 42obtained by the amplifier 43 results in a signal difference which isshown in FIG. 4(b). Meanwhile, the sum of the outputs of lines 40 and 42obtained by the amplifier 44 becomes as shown in FIG. 4(c). Therefore,with the waveform value of FIG. 4(b) divided by the waveform value ofFIG. 4(c), the output of the divider 45 is as shown in FIG. 4(d). Asapparent from the waveform shown in FIG. 4(d), the divider 45 produces afunction signal which becomes a minimum value at an in-focus point whilethe output (an absolute value) increases as the degree of deviationincreases. The defocus degree from the in-focus point is obtained inthis manner. The output of the amplifier 43 is supplied to a comparator47, which detects a focusing direction. In other words, when the outputlevel of the line 40 is higher than the output level of the line 42,that is, when an image is formed at the position 4 shown in FIG. 4 infront of the in-focus point and the sharpness at the front position ishigher than the in-focus point (in the region on the left hand side ofthe in-focus point A0 as shown in FIG. 4(a)), the amplifier 43 producesa positive output as shown in FIG. 4(b). Accordingly, the comparator 47produces a high level output to indicate that the lens 1 should be movedfrom a near-focus position (a state in which an image is formed in frontof the in-focus point) toward a far-focus position (in which an image isformed at the rear of the in-focus point). Conversely, when the outputlevel of the line 40 is higher than that of the line 42, that is, whenthe image is formed in the region on the right hand side of the in-focuspoint as shown in FIG. 4(a), the amplifier 43 produces a negative signalas shown in FIG. 4(b). The comparator 47, therefore, produces a lowlevel output to indicate that the lens 1 should be moved from afar-focus position toward a near-focus position. The focusing directionand the defocus degree are detected in the manner described above.

However, the defocus degree is accurately obtainable from the terminal46 only when the imaging point is within the internal region of thesensor 21 or 23. Accurate determination of the defocusing degree ishardly possible when the image is widely blurred across all of thepositions 4, 5 and 6. In view of this, diodes 49 and 50 and a resistor51 are in a line 52 to obtain a higher level signal from the sharpnesssignals of the lines 40 and 42. Then, this signal is compared at acomparator 53 with the signal of the line 41 which represents thesharpness of the prescribed focal plane. When the sharpness at theprescribed focal plane is higher than the sharpness degree at the planesbefore and after the prescribed focal plane, that is, when the imagingplane 2 is located at a point within the internal region of the sensor21 or 23 or when the defocus degree is of an accurate or reliable value(or an established value), a high level output is produced at a terminal54. In other words, the defocus degree is obtained as a function whenthe image is formed in the vicinity of the in-focus point, as shown inFIG. 4(d). However, when the image is formed at a position farther awayfrom the in-focus point (on the left hand side of point A01 or on theright hand side of A02, as shown in FIG. 4(d)), the signal representingthe defocus degree is not accurate.

However, even beyond that region, if the image does not blur excessivelydue to the sensor in the above stated focusing direction, it is stillpossible to obtain accurate information. Therefore, with the output ofthe line 41 compared with those of the lines 40 and 42 (A2 and A3 inFIG. 4(a)) by the comparator 53, if the result of the comparison iswithin the region A01 and A02 as shown in FIG. 4(d), the comparator 53produces a high level output to indicate that the defocus degree signalproduced from the terminal 46 is accurate.

Since it is possible that the outputs of the sensors 21, 22 and 23become inaccurate due to excessive blur, such an occurrence is detectedin the following manner. The outputs of these sensors 21, 22 and 23 aresupplied to a circuit consisting of diodes 55-57 and a resistor 58 toobtain a maximum sharpness degree. The signal thus obtained is comparedat a comparator 61 with a reference value defined by resistors 59 and60. If the result of the comparison indicates a sufficient degree ofsharpness (if an accurate direction can be detected in the focusingdirection), the comparator 61 produces a high level output therefrom. Inother words, even where an image is formed at a point beyond the regionA01-A02 of FIG. 4(d), if the image is not extremely blurred, accurateinformation is obtainable in the focusing direction. In such asituation, therefore, the sensor 21, 22 or 23 output (the sharpnesssignal) is compared with the reference value and, with the exception ofextreme blur, a high level output is produced from the comparator 61 andis supplied to an AND gate 62. Meanwhile, when the defocus degree is notof an accurate value, the comparator 53 produces a low level output asmentioned above. Therefore, the AND gate 62 produces a high level outputonly when accurate information is obtainable in the focusing direction.The high level output of the AND gate 62 is then transmitted to aterminal 63.

In case of extreme blur where no reliable signal or information isobtainable for both the defocus degree and the focusing direction, theoutput level of the comparator 61 becomes low. The low output isinverted at an inverter 64 to have a terminal 65 produce a high leveloutput to indicate that the signal is not reliable.

The response of every circuit mentioned in the foregoing is slow under adark condition. In view of this, the brightness signal of the line 30mentioned in the foregoing is supplied to a voltage control oscillator67 through an amplifier 66. Under a bright condition, pulses generatedby the oscillator 67 are produced at a high frequency as a distancemeasurement timing signal to allow a distance measuring action to beperformed at a high speed. Under a dark condition, low frequency pulsesare produced at a terminal 68 to cause the distance measuring action tobe performed at a relatively low speed. Furthermore, when the aboveresponse is ignorable, the pulses which are produced from the oscillator67 may be produced at a fixed period irrespective irrespective of thebrightness condition. In such a case, the pulses which are used astiming signals can be produced at a fixed period by disconnecting theamplifier 66 from the oscillator 67.

Furthermore, while the lens is being driven, i.e., during a motordriving process on the lens 1, the sensor outputs continuously vary,often resulting in erroneous distance measurement if the above data areproduced during the lens driving process. Therefore, during thisprocess, the voltage control oscillator 67 is cleared and renderedinoperative to prevent it from producing erroneous strobing pulses byarranging the drive control unit 14 which will be described later hereinto supply a terminal 69 with a signal the level of which becomes highduring the lens driving process. With this signal supplied to theterminal 69, distance adjustment on the basis of distance measurementdata is not performed. When storage type sensors such as CCD areemployed as the sensors 21-23, erroneous storage can be prevented bypermitting them to enter a new storage sequence after the level of theabove drill signal has become low.

While a distance measuring device of the blur detecting type has beendescribed in the foregoing as an embodiment of the invention, theinvention is also applicable to distance measuring devices of completelydifferent types, such as an image deviation type device. In that case,the region for reliable defocus computation is also limited. Theaccuracy of computation is less when great deviation takes place. Thedirection determining accuracy is also lower when great defocus occurs,such as excessive blur of the image (for example, in the case of a flatobject, etc.). In accordance with the invention, therefore, a signalrepresenting the accurate value of the defocus degree, a signal showingonly the accurate focusing direction, and a signal indicating that boththe defocus degree and the focusing direction are inaccurate can also beformed in such a device in the same manner as in the embodimentdescribed in the foregoing.

An example of the above stated drive indication or instruction unit 13is shown in FIG. 5. Referring to FIG. 5, the timing pulses produced fromthe terminal 68 are supplied from the above focus detection unit 12 to aterminal 101. Where both the focusing direction and the defocus degreeare uncertain, the high level output of the above terminal 65 issupplied as an uncertainty signal to a terminal 102. When only thefocusing direction is certain, the high level output of the terminal 63is supplied to a terminal 103 as a certainty signal for the direction.Meanwhile, a direction signal which represents the focusing directionand which is produced from the terminal 48 is supplied to a terminal104. Furthermore, when the image is within the defocus degree computableregion, the high level output of the terminal 54 is supplied to aterminal 105 as a certainty signal for the defocus degree. In thatinstance, the defocus degree signal which is the output of the terminal46 is obtained at a terminal 106.

The defocus degree signal which is obtained at the divider 45 and issupplied to the terminal 106 is converted into an absolute value by anabsolute value circuit 107 which is composed of, for example, a fullwave rectifier circuit and is further converted into a digital value byan A-D converter 108. After that, distance adjustment is performed onthe basis of the digitalized value. To simplify the description, theoperation subsequent to the detection of the distance measurement datawill be described in different cases as follows.

1. When the lens position is detected through the above stated detectionof the distance measurement data to be in an in-focus state, that is,within an automatic focusing adjustment region: In this case, the levelof the signal which is representative of a defocus degree and issupplied to the terminal 106 is at a value smaller than a given value.Therefore, with the defocus degree compared to the reference leveldefined by resistors 109 and 110 by a comparator 111, the result of thecomparison is a high level output. This high level comparison output andthe certainty signal for the defocus degree which comes from theterminal 105 as a high level output thereof are supplied to an AND gate112. This results in a high level output of the AND gate 112. This highlevel output of the AND gate 112 is changed to a low level through aninverter 117 and is then impressed on the input terminal D of a D typeflip-flop (hereinafter called DFF). This D type flip-flop DDF is set insynchronization with the above pulses from the oscillator 67. However,since at that instant the above low level input is impressed on theinput terminal D of the DFF, the output level of the D type flip-flopDFF becomes low and the low output is supplied to a terminal 119. Thisterminal 119 is connected to a drive signal terminal for the lens drivecontrol unit 14 which will be described later herein. Since the lens 1is not driven in response to this low level output, the lens 1 is keptin the in-focus state. Furthermore, at that instant, the high leveloutput of the AND gate 112 is transmitted to the A-D converter 108.Furthermore, if the reference level to be defined by the above resistors109 and 110 is adjustable according to the photo-taking aperture valueof the lens 1 in use, the in-focus region can be determined according tothe aperture value of the lens 1. In such a case, the focal pointsetting range (or distance setting range) of the lens 1, which can beregarded as an in-focus range, may become wider depending on theaperture value of the lens 1 to be used. Such an arrangement thereforepermits quick completion of a distance adjustment to prevent unnecessarylens adjustment to the in-focus position.

2. When the lens 1 position is not in-focus: In this case, the outputlevel of the comparator 111 becomes low. Therefore, the output level ofthe AND gate AND 112 also becomes low. The A-D converter 108 thenconverts the defocus degree signal from the above absolute value circuitinto a digital value. Meanwhile, the pulses from the oscillator 67 aresupplied to the line 115. The pulses are then transmitted to a latchcircuit 116 which consists of a plurality of D type flip-flops DFFs. Insynchronization with the pulses, the latch circuit 116 latches thesignals which have been supplied to the input terminals D1-D5 thereof asdistance measurement data. Furthermore, the above D type flip-flop DDF118 is set by the pulses and produces a high level output from theoutput terminal Q thereof. The high level output of the D type flip-flopDFF 118 is then transmitted to the lens drive unit 15 through a terminal119 to cause the lens 1 to be driven. The high level output of the Dtype flip-flop DFF 118 is also transmitted to the oscillator 67 torender it inoperative, so that new data is inhibited from being suppliedto the latch circuit 116 while the lens 1 is being driven.

2. (a) When the defocus degree is of a reliable (or accurate) valuewhile the lens 1 position is not in-focus: As has been described in theforegoing, a high level output representing certainty of the defocusdegree is supplied from the terminal 54 to the terminal 105 in thissituation. Low level inputs are supplied to the terminals 102 and 103from the terminals 65 and 63. This causes the level of input D3 tobecome high and the level of output Q3 of the latch circuit 116 tobecome high in synchronization with the above pulses and a line 124produces a high level output. The output level of an OR gate 125 alsobecomes high to open an AND gate 126. At that time, the uncertaintysignal of the terminal 102 is at a low level as mentioned above; thelevel of output Q5 of the latch circuit 116 is therefore low and thesignal level of line 127 is also low. Accordingly, since the level of aninverted, clear line 129 is low, a D flip-flop 128 produces a low leveloutput from its output terminal Q. An AND gate 130 is therefore closed.With the AND gate 126 opened as mentioned above, a focusing directionsignal which is supplied from the terminal 104 to the latch circuit 116is transmitted to a terminal 132 through an OR gate 131. This signalgives instruction to drive the lens 1 in that direction.

There is provided a D flip-flop 133 for storing a signal representingthe focusing direction detected through a previous distance measuringaction. This flip-flop 133 is clocked by pulses which are produced fromthe pulse oscillator 67 and are received as a signal from the line 115.

When the direction instructed is unchanged from the previouslyinstructed direction, the signal of the terminal 132 and the output Q ofthe flip-flop 133 coincide with each other irrespective of thedirection. Therefore, an exclusive OR gate 134 produces a low leveloutput to a line 135. Therefore, a divider circuit 136, which producesone-half of the input thereof, allows the whole input to passtherethrough without dividing it by two. Meanwhile, the high levelsignal of the above line 124 opens an AND gate 137. (At that time, thelevel of the signal of the terminal 103 is low resulting in the lowlevel of the output Q4 of the latch circuit 116. The level of a line 139is, therefore, low, closing an AND gate 138. Furthermore, the low levelof the above line 129 also causes another AND gate 140 to close). Withthe AND gate 137 thus being opened, a terminal 142 receives instructionthrough an OR gate with respect to the defocus degree required. When thedefocus degree φ is of an established value, the defocus degree is thusconverted into a signal value by the A-D converter 108. A defocus degreesignal latched at the latch circuit 116 is produced at the terminal 142through the output terminal Q2 of the latch circuit 116. Meanwhile, afocusing direction signal is produced from the terminal 132. The drivecontrol unit 14, which will be described later herein, then causes thelens 1 to be driven to an extent corresponding to the defocus degree inthe direction determined by the focusing direction signal. With the lens1 driven as much as the defocus degree, the line 121 produces a highlevel output in the form of a single pulse. This output of the line 121resets the D type flip-flop DFF 118 to lower the level of a drive signalfrom the terminal 119. The low level drive signal brings the lensdriving motor of a lens drive circuit to a stop. With the D typeflip-flop DFF 118 reset, the oscillator 67 again begins to operate. Withthe operation of the oscillator 67 resumed, the result of distancemeasurement detected through the circuit arrangement shown in FIG. 3 isagain latched at the latch circuit 116. When the lens 1 is driven to anin-focus position, the lens 1 is kept in that position, as mentioned inparagraph 1. above. When the lens driving action fails to bring the lens1 to an in-focus position or the object to be photographed happens tomove, the processes described above are once again performed to drivethe lens 1. Thus, the distance measuring action and the lens drivingaction, depending on the result of the distance measuring action, arerepeated until the lens 1 is brought to an in-focus position.

Input terminals D1, D3, D4 and D5 of the above latch circuit 116 areone-bit input terminals while another input terminal D2 is set up with anumber of bits depending on the output of the A-D converter 108.Likewise, the output terminals Q1, Q3, Q4 and Q5 of the latch circuit116 are one-bit output terminals while another output terminal Q2 is setup with the same number of bits as the input terminal D2.

Referring to FIG. 6, the above divider circuit 136 consists of dataselectors SEL1 and SEL2 and OR gates OR1-OR4. When the output level ofthe exclusive OR gate 134 is low, as mentioned in the foregoing, theselector SEL1 is selected through an inverter. Then the outputsQ2-1-Q2-4 of the latch output terminal Q2 are produced from the OR gatesOR1-OR4. When the output level of the OR gate 134 is high, the selectorSEL2 is selected and the OR gate OR4 produces a low level output whileoutputs Q2-4-Q2-2 are produced from the OR gates OR3-OR1. With theselector SEL2 selected, the outputs of the latch circuit 116 are thusproduced from the divider circuit 136 after they are shifted by one bit,i.e., after they become one-half. In FIG. 6, the outputs of the latchcircuit 116 output terminal Q2 are shown as 4 bits including a first bitQ2-1 through a fourth bit Q2-4. However, the number of bits is notlimited to thus number and a divider circuit 143 can also be arrangedlikewise. While the AND gates 137, 138 and 140 and the OR gate 141 aresolely shown in FIG. 5 for the sake of simplification of theillustration, they are actually provided in greater numberscorresponding to the number of output bits of the circuits 136, 143 and145.

With the divider circuit 136 arranged as described above, when thefocusing direction signal from the line 132 shows a direction differentfrom the direction shown by the previous focusing direction signal heldat the flip-flop 133 during the operation described above, the outputlevel of the exclusive OR gate 134 becomes high. Then, the output Q2 ofthe latch circuit 116, i.e., the defocus degree, is reduced to one halfby the divider circuit 136 to prevent oscillation at a point in thevicinity of the in-focus point. More specifically, when the lens 1 isdriven by the operation mentioned above to move to the extent of thedefocus degree in the instructed direction, or when the lens 1 isdriven, for example, from a position A1 in the direction of the arrow asmuch as a defocus degree D1 as shown in FIG. 7, there is the possibilitythat the lens 1 might be overshot and might be moved to a point A2 whichis beyond an in-focus A0. Such an overshoot results in a focusingdirection different from the previous direction in the process ofdetecting the defocus degree and the focusing direction. In that case,the lens 1 is driven as far as a defocus degree D2 in the reversedirection, as shown in FIG. 7. Then, a second overshoot brings the lens1 to another position A3. Therefore, if the lens 1 is driven as far asthe defocus degree in the vicinity of the in-focus point, the lens 1cannot be readily adjusted to the in-focus point A0 due to suchovershooting. In accordance with the present invention, therefore, whena focusing direction differing from the focusing direction of theprevious instruction is obtained through the process of distancemeasurement, that is, when overshooting takes place, a high level outputis produced from the exclusive OR gate 134 to actuate the dividercircuit 136 and then a driving degree signal which corresponds to onehalf of the obtained defocus degree is produced from the terminal 142.Accordingly, the lens 1 is driven to an extent corresponding to one halfof the defocus degree to prevent the above overshoot for quickadjustment of the lens 1 to the in-focus position thereof.

2. (b) When only the focusing direction is established while the lens 1is not in focus: In this instance, the level of the terminal 54, or thatof the terminal 105, becomes low; the level of the terminal 63, or thatof the terminal 103, becomes high; the level of the terminal 65, or thatof the terminal 102, becomes low as mentioned in the foregoing. Thelevel of the output Q3 of the latch circuit 116 becomes low. The levelof the output Q4 becomes high and that of the output Q5 low.Accordingly, the level of the line 124 becomes low, that of the line 139high and the levels of lines 127 and 129 low. This demands that the lens1 be driven to a given distance in the focusing direction thusdetermined. The focusing direction is determined as follows. The outputlevel of the OR gate 125 is caused to become high by the high leveloutput of the line 139. Then the focusing signal, which is latched atthe latch circuit 116 and is produced from the output terminal Q1thereof, is produced at a direction indication terminal 132 through theAND gate 126 and the OR gate gate 131.

Furthermore, since the levels of the lines 124 and 129 are low and thelevel of the line 139 high, the AND gates 137 and 140 are closed and theAND gate 138 opens. Therefore, through the AND gate 138, a constantsetting element 144 which is composed of a register in which a digitalvalue 1010, for example, corresponding to a predetermined constant isset supplying this digital value to the terminal 142 as described in theforegoing. In this case, therefore, the lens 1 is driven in the focusingdirection indicated, to a given extent, based on data representing agiven driving extent set at the constant setting element 144. After thelens 1 is driven a given extent in this manner, the high level output ofthe terminal 121 is supplied in the form of a single pulse stopping thelens driving action. Again, the result of distance measurement islatched at the latch circuit 116. Then, the lens 1 is driven once againaccording to the result of distance measurement. The lens 1 is thusrepeatedly driven to a given extent each time until the conditiondescribed in paragraph 2. (a) above is attained. Then, the embodimentperforms the operation as described in paragraph 2. (a).

As for the predetermined driving extent to be set by the above constantsetting element 144, it is set at a value that does not often cause thelens 1 movement to exceed an established defocusing range and it alsodoes not exceed a range for establishing the focusing direction. Forexample, the driving extent is set at 2 mm. Furthermore, the constantmay be adjusted according to the aperture value of the lens 1 or thefocal length thereof. In driving the lens 1 according to the data fromthe constant setting element, if the output level of the exclusive ORgate 134 is high, a divider circuit 143 is actuated, driving the lens toan extent which is one half of the above stated constant.

2. (c) When both the focusing direction and the defocus degree areuncertain while the lens 1 position is not in focus: The result ofdistance measurement by the circuit shown in FIG. 3 causes the levels ofthe terminals 105 and 103 to become low and that of the terminal 102high. As a result, the levels of the lines 124 and 139 become low whilethat of the line 127 becomes high. The uncertainty of the focusingdirection sometimes momentarily and accidentally results from vibrationof the hands or the like. However, in case of intrinsic uncertainty, asearch is conducted over the whole region of the lens 1 to adjust thelens 1 position to an in focus point which is greatly deviated from anormal in-focus position. However, if such searching action begins evenin response to a momentary vibration, such a searching action is notonly detrimental to operability but also results in the loss of anin-focus point to which the lens 1 has already been adjusted. To solvethis problem, there is provided a stabilizing circuit which is arrangedin the following manner. When the level of the output Q5 of the latchcircuit 116 is caused to become high by the high level output of theterminal 102 and thus results in the high level of the line 127, the Dtype flip-flop DFF 128 is released from a reset state. However, sincethe level of the output Q of the D type flip-flop DFF 128 still remainslow under this condition, the level of the line 129 does not becomehigh. Since the levels of the lines 124 and 139 are also low, the ANDgates 126 and 130 are closed. Therefore, the level of the terminal 142also becomes low. Furthermore, since the AND gates 137, 138 and 130 arealso closed, a signal of zero drive demanding quantity information isproduced at the terminal 142 through the OR gate 141. Therefore, thelens 1 is not driven. This causes the line 121 to produce a high leveloutput for a short period of time therefrom, as will be described later.This high level output of the line 121 comes through the OR gate 123 toreset the D type flip-flop DFF 118. When the D type flip-flop DFF 118reset, the oscillator 67 begins to operate, as described in theforegoing. The result of distance measurement performed by the circuitshown in FIG. 3 is again set at the latch circuit 116. Assuming that thelevel of the output Q5 of the latch circuit 116 produced as a result ofa second distance measurement is low, the D type flip-flop DFF 128 iscleared and the level of the output Q of the D type flip-flop DFF 128 iskept at a low level. Therefore, the operation described in paragraph 2.(a) and 2. (b) above is performed in accordance with a second distancemeasurement. Where the level of the output Q5 of the latch circuit 116is high despite the second distance measurement, a high level output isproduced from the output terminal Q of the D type flip-flop DFF 128.Therefore, the level of the line 129 becomes high only when the firstand second distance measurements consecutively show that both thedefocus degree and the focusing direction are uncertain.

When the output level of the line 129 becomes high in this manner, theAND gate 140 is opened to have the predetermined value which is set atthe constant setting circuit or element 145 produced from the terminal142, as a driving extent required. Then, the lens 1 is driven to theabove predetermined extent in the direction determined by the focusingdirection signal at the terminal 132.

The predetermined extent mentioned above is larger than the value set atthe above circuit 145 and is set at a value that permits a quick searchover the whole lens 1 driving range to find without fail an in-focuspoint, i.e., without exceeding a discernible direction range.

With the lens 1 driven to the predetermined extent as mentioned above,the line 121 produces a high level output for a short period of timestopping the lens driving action. Then, the result of distancemeasurement performed by the circuit shown in FIG. 3 is again latched atthe latch circuit 116. Therefore, when the lens 1 moves to the conditionshown in paragraph 2. (b), the operation described in paragraph 2. (b)is performed thereafter. Where the lens 1 still remains in the conditionof paragraph 2. (c) despite the lens 1 driving process, the lens 1driving action to a predetermined extent is repeated until the conditionof the lens 1 shifts to the condition of paragraph 2. (a) or 2 (b).Furthermore, under the conditions of 2. (c), the focusing direction isinaccurate and, therefore, the lens 1 might be driven in a directionopposite to the in-focus direction. In such a case, an end signal, whichwill be described later herein, is supplied to the terminal 122 when thelens 1 is thus driven to limit an extent. Since a T flip-flop 146 isinverted by this end signal, the output of the AND gate 130 is invertedto invert the focusing direction signal supplied to the terminal 132.Therefore, when the lens 1 is brought to the predetermined extent limitby the lens 1 driving action, the lens 1 driving direction is reversedmoving it toward an in-focus point. Therefore, the lens 1 is shifted tothe condition of 2. (a) or 2. (b) without fail with the lens drivingaction repeatedly performed to the predetermined extent.

Referring now to FIG. 8, one example of the above stated drive controlunit 14 is arranged as follows. This drive control unit 14 has the lens1 driven to an extent corresponding to the defocus degree (the output ofthe terminal 142) supplied from the drive indication or instruction unit13 to a terminal 201, in the driving direction indicated by the focusingdirection signal (the output of the terminal 132) supplied to a terminal202, only for a period during which the drive signal (the output of theterminal 119) supplied to a terminal 203 remains at a high level. Thisunit 14 includes a lens drive monitor circuit portion. This portion hasa monitor terminal 208. To this terminal 208 is connected a comb-shapedcontact, which is shown in FIG. 9. This comb-shaped contact turns on andoff every time the lens 1 is moved a predetermined extent. The on andoff condition of the comb-shaped contact is detected by circuit elementsincluding resisters 209 and 211, a capacitor 210 and an amplifier 213.These circuit elements form a pulse forming circuit which produces apulse signal every time the comb-shaped contact turns on. Within thispulse forming circuit, the capacitor 210 and the resistor 211 form atime constant circuit, which prevents the adverse effect of chattering,when chattering takes place at the comb-shaped contact. A diode 214prevents the potential of a point 212 from becoming an abnormally highpotential. The pulse forming circuit normally produces a high leveloutput and produces a low level output when the above comb-shapedcontact turns on for a period of time corresponding to the time constantdefined by the above circuit. The above pulse signal is formed by thesehigh and low level outputs of the pulse forming circuit.

The unit further includes a computing circuit portion in which a line207 receives a digital value corresponding to a defocus degree (focusshifting extent) resulted from a lens 1 driving extent when pulses areproduced from the above pulse forming circuit, as will be describedlater herein. In other words, since one pulse is formed and producedfrom the pulse forming circuit every time the comb-shaped contact turnson, that is, every time the lens 1 moves as much as the spacing distancebetween one comb tooth and another, the extent of the lens 1 movement(or focus shifting extent) which takes place every time one pulse isproduced from the pulse forming circuit can be predetermined Therefore,a digital value (hereinafter called a defocus degree/pulse value), whichcorresponds to the focus shifting extent per pulse, is supplied from theline 207 to a circuit which will be described below.

The digital value from the line 207 is impressed on an input terminal Aof an adder 216. The adder 216 then adds together the digital value anda signal received at another input terminal B thereof. A sum thusobtained is produced from a line 217. The sum value from the line 217 issupplied, in synchronization with the pulses from the pulse formingcircuit, to a register 215 which consists of a D type flip-flop DFF witha plurality of bits. The output of this register is impressed on theinput terminal B of the above adder 216. Such being the arrangement, thelens 1 movement extent (defocus degree) per pulse from the line 207 isaccumulated at the register 215 every time a pulse is produced from thepulse forming circuit. The register 215 thus stores a digital valuewhich corresponds to (number of pulse producing times)×(defocus degreeper pulse), i.e, a defocus degree up to that point in time. A magnitudecomparator 218 compares the above defocus degree signal, which isimpressed on an input terminal B thereof, with a signal impressed onanother input terminal A thereof. Since a digital value corresponding tothe lens 1 movement extent (a defocus degree) up to that time is storedat the register 215 as mentioned above, when the lens 1 is moved to theextent of the defocus degree computed by the circuit shown in FIG. 3during the lens 1 driving process, the input A of the comparator 218becomes larger than the input B thereof. This results in a high leveloutput of a line 219. The terminal 203 which is connected to theterminal 119 produces a high level output Q of the D type flip-flop DFF118 during the lens 1 driving process, as mentioned in the foregoing.Therefore, when the lens 1 driving process to the defocus degree come toan end, as mentioned above, an AND gate 220 produces a high leveloutput. The output level of the terminal 119 then changes from a highlevel to a low level ending the lens 1 driving action. Furthermore, theregister 215 is reset when the level of the driving signal of theterminal 203 is low, that is, the register is clear when the lens 1 isnot driven.

Further included in the unit is a lens limit detection circuit portion,which is arranged as follows. The output level of the terminal 203 islow when the lens 1 is not driven because the level of the output Q ofthe D type flip-flop DFF shown in FIG. 5 is low, as mentioned above.When the lens 1 is not driven, therefore, the level of an output line223 of an inversion input OR gate 222 becomes high to reset a frequencydivider 224 and an RS flip-flop 225. Accordingly, the level of theoutput Q, i.e., the level of an end signal terminal 226 of the RSflip-flop 224 becomes low. During the lens 1 driving process, on theother hand, the output level of the terminal 203 becomes high. Thiscauses the output level of the inversion input OR gate to become lowunless the output level of the amplifier 213 of the above pulse formingcircuit changes to a low level (that is, unless the comb-shaped contactturns on in relation to lens 1 movement). As the output level of the ORgate 222 thus stay low, the frequency divider 224 is released from acleared state and begins to count the pulses from an oscillator 227.When a number of pulses designated by the signal of a point 207 havebeen thus counted, the frequency divider 224 causes the level from aline 228 to become high and produces a carry output. In other words, thecarry output is produced when no pulse comes from the pulse formingcircuit for a period of time longer than a predetermined length of timeafter receipt of the driving instruction for the lens 1. With the carryoutput thus produced, the RS flip-flop 225 is set to produce a highlevel signal at the terminal 226 to show that a lens 1 limit has beenreached. More specifically, in order to stop the lens 1 upon arrivalthereof at the lens limit, the comb-shaped contact no longer performsthe on-and-off action thereof and no pulse is produced from the pulseforming circuit thereafter. In that situation, therefore, the frequencydivider 224 produces the carry output having a high level signalproduced at the terminal 226 to indicate the limit, so that theoperation described in paragraph 2. (c) above can be carried outaccordingly. When the lens 1 has not reached the limit, the comp-shapedcontact, of course, turns on and off within the predetermined period oftime. The output level of the amplifier 213 then changes to a low levelto make the output level of the inversion input OR gate 222 high. Thishigh level output clears the frequency divider 224. Therefore, no carryoutput is produced and, therefore, no high level output is produced atthe terminal 226.

The arrangement detecting lens 1 limit by a change or no change in thepulse signal produced in relation to the lens 1 driving process permitsthe drive monitoring operation to be adequately accomplished with theuse of only a single signal line. Furthermore, there is the possibilitythat the defocus degree (focus shifting extent) relative to the extentof lens 1 movement fluctuates with variation in the zooming conditionand design of the lens 1. To make the defocus degree per unit timealways unvariable, the extent of lens 1 movement relative to a givendefocus degree (or a focus shifting extent) must be varied according tothe zooming condition and the type of lens 1 used. This necessitatesadjusting the extent of lens 1 movement per unit time according to thezooming condition, etc. As a result of this arrangement, the period orcycle of pulses produced from the pulse forming circuit varies.Therefore, if the above-mentioned time for time count by the frequencydivider 224 is not variable, there would arise such inconvenience thatwhen the pulse period or cycle becomes longer, for example, no pulse isproduced within the above stated period of time. In such a case, a limitdetecting action would be performed before the lens 1 has come to thelimit. In accordance with the invention, therefore, a signalrepresentative of a defocus degree per pulse from the line 207 issupplied to the frequency divider 224. With this signal supplied, thefrequency dividing ratio of the frequency divider 224 is varied tochange the count time as required. For example, where the defocus degreebecomes N when the extent of lens 1 movement per unit time is D and onepulse is produced when the lens 1 moves as much as the extent D, thelimit detection can be accurately accomplished by setting the time fortime count by the frequency divider 224 at a length of time A+α which isslightly longer than the unit time A. However, assuming that the defocusdegree is adjusted to become N when the extent of movement becomes D/2,if the defocus degree per unit time is to be retained at N, the extentof movement per unit time must be multiplied by one half to make it D/2.Then, the pulse produced per unit time A becomes one half pulse. As aresult, no pulse would any longer be produced within the time countingtime A and then the lens 1 would be considered to have reached a limitbefore it actually reaches the limit. In that instance, therefore, thetime count time must be doubled to make it 2A. To solve this problem inaccordance with the invention, the frequency dividing ratio of thefrequency divider 224 is varied to adjust the above time according tothe signal from the line 207. For example, the frequency dividing ratiois varied as the defocus degree per pulse becomes N or becomes 2N.

There is also provided a circuit portion for controlling a lens 1driving force. When the driving force and speed of the motor vary withthe lens 1 or when the interval of pulses relative to the lens 1 varies,this circuit portion serves to compensate for such variations. In thiscircuit portion, the output of a reference oscillator 230 is frequencydivided at a variable frequency divider 231 by the signal of the line207, which is the signal of (defocus degree)/(one pulse interval). Thefrequency divider 231 is provided for the purpose of forming pulses of areference period or cycle. The phase of the pulses of the referencecycle and that of the pulses from the pulse forming circuit, mentionedin the foregoing, are detected and the driving speed of the motor iskept constant by a circuit, which will be described later herein. Asdescribed in the foregoing, in order to make the defocus degree per unittime always unvariable despite changes in the defocus degree associatedwith the extent of lens 1 movement or shifting of lens 1 position,irrespective of zooming conditions, etc., the extent of lens 1 movementper unit time, or the lens 1 driving speed must be adjusted. For thispurpose, in accordance with the invention, a signal which represents adefocus degree per pulse from the above line 207 is supplied to thefrequency divider 231 to control the frequency dividing ratio thereof.More specifically, assuming that the defocus degree per pulse is N, thecycle of the frequency divider 231 is A and under this condition themotor is running at a speed S, the speed S must be adjusted to one halfS when the defocus degree per pulse becomes 2N. Without such anadjustment, it is hardly possible to retain the defocus degree per unittime at a given constant value N. Therefore, the above reference cyclemust be adjusted to 2A and the motor must be operated in synchronizationwith the pulses of the cycle 2A. To attain this purpose, the signal ofthe line 207 which represents the above defocus degree per pulse is usedto control the frequency dividing action of the frequency divider 231for adjustment of the cycle of the reference pulses. The referencepulses are applied, together with the pulses which are in associationwith the actual lens 1 movement and are obtained from the multiplier213, to a phase comparator 233 which has a phase locked loop and isprovided with a low-pass filter for the output thereof. The comparator233 produces a high level output when the actual lens associated pulsesare slower than the reference pulses and a low level output when thelatter pulses are slower than the former. The output of the comparator233 is transmitted through an amplifier 235 to increase or decrease thepower of the motor until a value which gives about the same pulses asthe reference pulses is obtained through a feedback process. Thisarrangement prevents variations in response speed and the inconvenienceresulting from the above erroneous action of the limit detecting circuitportion. An oscillator 236 is a limiting oscillator which prevents thelens associated pulses from having excessively short intervals and frombecoming too quick in distinguishing them from chattering or frombecoming almost uncontrollable. A phase comparator 237 with a phaselocked loop which is provided with a low-pass filter for the outputthereof compares the lens associated pulses with the output pulses ofthis oscillator 236. When the lens associated pulses are abnormallyquick, the comparator 237 produces a high level output which turns on annpn transistor 239 through a resistor 238. With the transistor 239turned on, speed control (stabilizing control over the focal planeshifting extent) by the above phase comparator 233 is restricted toprevent the lens associated pulses from becoming too quick and thus toprevent an erroneous operation from resulting therefrom. In other words,with the transistor 239 turned on, the input level of the amplifier 235is lowered to restrict the motor power and to lower the motor speed, sothat the driving system can be adjusted for different lenses 1.

Also provided in the unit is a motor drive circuit portion in which,when the lens 1 is not driven, the low level output of the terminal 203is impressed to make the output level of a gate 241 low. The low leveloutput of the gate 241 causes the output level of an inverter 242 tobecome high. The high level output of the inverter 242 turns off a pnptransistor 224 through a resistor 243. Meanwhile, a low level inversioninput of an OR gate 245 results in a high level output thereof, whichturns on an npn transistor 247 through a resistor 246. Since the outputlevel of another AND gate 248 also becomes low, the output level of aninverter 249 becomes high turning off a pnp transistor 251 through aresistor 250. An inversion OR gate 252 also has a low level inversioninput and thus produces a high level output turning on an npn transistor254 through a resistor 253. With the transistors 247 and 254 turned onand by virtue of diodes 255-258, prevent the transistors 247 and 254from being damaged by a back electromotive force of the motor, motorterminals 259 and 260 are short-circuited to apply a brake(electromagnetic brake). Since the lens 1 has not reached the limit, theoutput Q of the RS flip-flop 225 is at a low level. Therefore, theoutput levels of NAND gates 260 and 261 are high.

Assuming that the output level of the terminal 203 becomes high, drivingthe lens 1 when the output level of the driving direction terminal 202is high, the output level of the AND gate 248 becomes high. The outputlevel of the OR gate 252 also becomes high. The transistor 254 turns on.A low output level of the inverter 249 then turns on the transistor 251.Furthermore, since the output level of the AND gate 241 is low, theoutput level of the OR gate 245 is low. Accordingly, the transistor 247turns off. Furthermore, since the output level of the inverter 242 ishigh, the transistor 244 also turns off. As a result, the output(positive) of the amplifier 235 is applied to the terminal 259.Meanwhile, another terminal 260 is grounded by the transistor 254causing the motor to drive the lens 1 in the desired direction. Theoutput level of a NAND gate 262 becomes low stopping the motor fromdriving when the lens 1 reaches the limit.

When the lens 1 is to be driven in the opposite direction, when thelevel of the terminal 203 is high while that of the terminal 202 is low,the output level of the AND gate 241 becomes high. THe output level ofthe OR gate 245 becomes high turning on the transistor 247. Meanwhile,the output of the inverter 242 becomes low turning on the transistor244. Furthermore, with the output level of the AND gate 248 becominglow, the output level of the OR gate 212 also becomes low turning offthe transistor 254. Furthermore, with the output level of the inverter249 being at a high level, the transistor 251 turns off. As a result,the output (positive) of the amplifier 235 is applied to the terminal260 while the transistor 247 turns on grounding the terminal 259. Then,the motor drives the lens 1 in a direction opposite the directionmentioned in the foregoing. Upon arrival of the lens 1 at the limit, theoutput level of the NAND gate 261 becomes low stopping driving of themotor. The brake is applied in the same manner as in the above case whenthe driving action is stopped by the low output level of the drivingterminal 203.

The drive unit 15, which has been mentioned in the foregoing, isarranged, for example, as shown in FIG. 9. The arrangement shown in FIG.9 corresponds, for example, to an interchangeable lens for a single-lensreflex camera. In this example, a photo-taking lens 301 has its positionshifted by a motor 304 under the control of terminals 305 and 306through a reduction mechanism 302 and 303. The same focusing mechanismcan be attained by not only arranging the whole lens assembly to bemovable forward but also to make a front lens or part of other lensgroups movable. In this case, the above lens 301 associated pulses areproduced at a motor terminal 309 as the lens 301 position is shiftedwith a brush 307 operating in association with the lens 301 and groundedand particularly with the brush 307 cooperating with a comb-shapedelectrode pattern 308. The unit is provided with a resistor 310 whichhas its resistance value used for setting information on(defocus/degree)/(pulse interval). This information is produced at aterminal 311. The information from the terminal 311 is converted into adigital value by the A-D converter 206 in the same manner as has beendescribed in the foregoing. Furthermore, if the resistor 310 is operablein relation to the zooming action of a zoom lens, the value of the abovestated information can be adjusted according to the zoom ratio of thelens 301. Such an arrangement enables automatic transmittal of changesin the extent of the lens 301 movement due to zooming and the defocusdegree (focus shifting extent) to the aforementioned circuits which areconnected to the line 207, so that the focus shifting extent per unittime will be unvariable.

Further included in the unit are stop members 312 and 313 which stop theforward and backward movements of the lens 301. When the lens 301 abutsone of the stop members 312 and 313, the stopping action is detected bythe limit detecting circuit portion of the drive control unit 14 shownin FIG. 8. Upon detection, the lens 310 is no longer driven, so that thelimit control can be accomplished without recourse to additionalswitches or the like.

As has been described in the foregoing, the automatic focusing deviceaccording to the invention is capable of promptly bringing the lens 301into an in-focus position either by driving the lens 301 according to adefocus degree or by driving it to a fixed extent according to theaccuracy of the defocus degree detected and that of the focusingdirection signal. Furthermore, also as described in the foregoing, if anovershoot once happens, the defocus degree obtained is reduced and thelens 301 is then driven according to the reduced defocus degree.Besides, in driving the lens 301 to an extent corresponding to thedefocus degree obtained, the lens 301 is driven to that extent throughan adding operation. Therefore, the invention not only effectivelyprevents hunting but also permits defocus degree control with a simplearrangement. Furthermore, in the embodiment shown in FIG. 8, acomputation circuit is formed by the adder 216 and the magnitudecomparator 218. The same effect, however, can be obtained by replacingthis circuit with a subtraction circuit, which may be arranged asfollows. Every time a pulse is produced from the pulse forming circuit,the substraction circuit is used to substract the digital value obtainedfrom the line 207 from the defocus degree produced from the terminal 201and then a high level output is produced from the terminal 221 when thesubtraction result is zero.

Also, the computation of the defocus degree performed by the divider 45of FIG. 3 may be replaced with simple computation performed by additionand subtraction.

In the embodiment shown in FIG. 6, the lens associated pulses areproduced by a mechanical contact method using the brush 307 and thecomb-shaped electrode 308. However, the invention is not limited to thisarrangement, which may be replaced with some non-contact arrangementthat uses, for example, a photo-interrupter, an electromagnetic pick-uparrangement, etc.

What we claim:
 1. A camera system capable of using a variable focallength lens and having an automatic focusing function, comprising:(a)focus detection means for detecting light coming through a lens andgenerating a difference signal corresponding to an existing deviation ofa real image plane on which an image of an object is being really formedrelative to a predetermined focal plane; (b) driving means for drivinglenses; (c) a signal forming circuit for generating a signal whichindicates an amount of shifting of an image plane against an amount ofshifting of a lens when the lens is driven by said driving means, saidsignal from said signal forming circuit varying depending on a zoomstate used on the lens, and said signal forming circuit being providedat the lens; (d) detection means for detecting the shifting of the lens;and (e) a stopping circuit for accumulating the signal of said signalforming circuit every time said detection means detects that the lensshifts by a unit shifting amount and at the same time stopping thedriving of the lens by said driving means when an amount of saidaccumulation of signal develops a prescribed relationship with saiddifference signal.
 2. A camera system capable of using a variable focallength lens and having an automatic focusing function, comprising:(a)focus detection means for detecting light coming through a lens and forgenerating a difference signal corresponding to an existing deviation ofa real image plane on which an image of an object is being really formedrelative to a predetermined focus plane; (b) driving means for drivinglenses; (c) first signal forming means for forming a signal to indicatea shifting amount of the lens; (d) second signal forming means forforming a signal, said signal from said second signal forming meanschanging according to a zooming state of the lens, said second signalforming means forming said signal separately from a signal formingoperation of the first signal forming means; and (e) means forcontrolling the driving amount of the lens driven by said driving meansbased on the signals from the first and second signal forming means andsaid difference signal.
 3. A camera system in accordance with claim 2,wherein said first and second signal forming means are provided at thelens and, also, a first terminal for sending out the signal from thefirst signal forming means and a second terminal being provided,separately from said first terminal, for sending out the signal from thesecond signal forming means are provided and, also, third and fourthterminals, for introducing the signals from said first and secondterminals, are provided at the camera side, so that each one of thesignals is introduced into the controlling means through said third andfourth terminals.
 4. A camera system in accordance with claim 2, whereinsaid focus detection means forms a directional signal for driving thelens to said predetermined focus plane.
 5. A camera system capable ofusing interchangeable lenses and having an automatic focusing function,comprising:(a) focus detection means for detecting light coming througha lens and for generating a difference signal corresponding to anexisting deviation of a real image plane on which an image of an objectis being really formed relative to a predetermined focus plane; (b)driving means for driving lenses; (c) monitoring signal forming meansfor forming a monitoring signal which indicates a driving state of thelens by said driving means; (d) information signal means provided at thelens for providing an information signal, said information signalchanging according to a zoom state; (e) a driving control circuit forcontrolling a shifting amount of the lens by the driving means based onsaid difference signal, the information signal and the monitoringsignal; and (f) control means for alternately carrying out a detectionaction by said focus detection means and a driving control by saiddriving control circuit.
 6. A camera system according to claim 5,wherein said focus detection means is placed in a non-operative statewhen an operating signal of the driving control circuit indicates a lensdriving state, and is placed in an operative state when said signalindicates a lens driving stoppage state.